﻿/*  (c) 2008 Benjamin Schroeter
 *  This file is part of JaDAL - Just another DSL-Tools Addon Library
 *  and licensed under the New BSD License
 *  For more information please visit http://www.codeplex.com/JaDAL */

namespace BenjaminSchroeter.DslTools
{
    /// <summary>
    /// Implement this interface in your shapes or model element.
    /// 
    /// It will be used to determine if the deletion of this element
    /// should be allowed or forbid.
    /// </summary>
    /// <remarks>
    /// I recommend to implement this method in the model elements 
    /// since the model explorer knows nothing about your shapes and cannot 
    /// call this method if implemented in the shape classes. You need not 
    /// to implement this method for every model element, only for those you 
    /// want to forbid deletion. Just return false or implement some logic 
    /// based on the model element state.
    /// </remarks>
    public interface IDynamicCanDelete
    {
        /// <summary>
        /// Determines whether this shape or model element can be deleted by the user.
        /// </summary>
        /// <returns>
        /// 	<c>true</c> if this shape or model element can be deleted by the user; otherwise, <c>false</c>.
        /// </returns>
        bool CanDelete();
    }
}
